<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/style.css" media="screen" rel="stylesheet"
	type="text/css" />
<link rel="stylesheet" type="text/css" href="css/createlocal.css" />
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places"></script>
<title>Vnplace.vn</title>
<script>
	function initialize() {
		var mapOptions = {
			center : new google.maps.LatLng(15.3105143,107.1470245),
			zoom : 13
		};
		var map = new google.maps.Map(document.getElementById('map-canvas'),
				mapOptions);
// 		var province = document.getElementsByName("province").value;
		
		var input = (document.getElementById('district'));
		// 			  map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
		var autocomplete = new google.maps.places.Autocomplete(input);
		autocomplete.bindTo('bounds', map);

		var infowindow = new google.maps.InfoWindow();
		var marker = new google.maps.Marker({
			map : map,
			anchorPoint : new google.maps.Point(0, -29)
		});

		google.maps.event.addListener(autocomplete, 'place_changed',
				function() {
					infowindow.close();
					marker.setVisible(false);
					var place = autocomplete.getPlace();
					if (!place.geometry) {
						return;
					}

					// If the place has a geometry, then present it on a map.
					if (place.geometry.viewport) {
						map.fitBounds(place.geometry.viewport);
					} else {
						map.setCenter(place.geometry.location);
						map.setZoom(17); // Why 17? Because it looks good.
					}
					/** @type {google.maps.Icon} */
					marker.setIcon(({
						url : place.icon,
						size : new google.maps.Size(71, 71),
						origin : new google.maps.Point(0, 0),
						anchor : new google.maps.Point(17, 34),
						scaledSize : new google.maps.Size(35, 35)
					}));
					marker.setPosition(place.geometry.location);
					marker.setVisible(true);
				});
	}

	google.maps.event.addDomListener(window, 'load', initialize);
</script>

	<style>
		#main_content{
			min-height: 490px;
				font-family: Arial, Helvetica, sans-serif;
		}
		#content-main{
			border: 1px solid #C8C8C8;
			width: 600px;
			height: 200px; 
			margin-left: 245px;
/* 			margin-top: 100px; */
			padding-top: 20px;
			padding-left: 20px;
			background: #F8F8F8;
		}
		#content-acc{
			margin-left: 20px;
			margin-bottom: 20px;
			margin-top: 20px;
			color: 	#008A2E;
		}
		b{
			color: #19A3A3;
		}
		.btn-create{
 			margin-left: 5px;
			margin-top: 10px;
			height: 32px;
			width: 160px;
			font-size: 14px;
			font-weight: bold; 
			background: #19A3A3;
			border: thin;
			color: white;
		}
		.btn-create:hover{
			background: 	#4DB8B8;
		}
		.btn-add{
			margin-top: 10px;
			height: 32px;
			width: 220px;
			font-size: 14px;
			font-weight: bold; 
			background: #19A3A3;
			border: thin;
			color: white;
		}
		.btn-add:hover{
			background: #4DB8B8;
		}
	</style>
</head>
<body>
	<div id="wrap-container">
		<div id="header-menu">
			<form action="/Vnplace/SearchLocation" method="post">
			<ul id="top-menu">
				<li class="li-brand"><a href="homepage.jsp"><img alt=""
						src="image/logo.jpg" width="90px" height="80px;"></a></li>
				
				<li><select class="province" name="province">
						<option value="null" selected="selected">----- Tỉnh -----</option>
						<option value="1">An Giang</option>
						<option value="2">B&#224; Rịa Vũng T&#224;u</option>
						<option value="3">Bắc Giang</option>
						<option value="4">Bắc Kạn</option>
						<option value="5">Bạc Li&#234;u</option>
						<option value="6">Bắc Ninh</option>
						<option value="7">Bến Tre</option>
						<option value="8">B&#236;nh Định</option>
						<option value="9">B&#236;nh Dương</option>
						<option value="10">B&#236;nh Phước</option>
						<option value="11">B&#236;nh Thuận</option>
						<option value="12">C&#224; Mau</option>
						<option value="13">Cần Thơ</option>
						<option value="14">Cao Bằng</option>
						<option value="15">Đ&#224; Nẵng</option>
						<option value="16">Đắk Lắk</option>
						<option value="17">Đăk N&#244;ng</option>
						<option value="18">Điện Bi&#234;n</option>
						<option value="19">Đồng Nai</option>
						<option value="20">Đồng Th&#225;p</option>
						<option value="21">Gia Lai</option>
						<option value="22">H&#224; Giang</option>
						<option value="23">H&#224; Nam</option>
						<option value="24">H&#224; Nội</option>
						<option value="25">H&#224; Tĩnh</option>
						<option value="26">Hải Dương</option>
						<option value="27">Hải Ph&#242;ng</option>
						<option value="28">Hậu Giang</option>
						<option value="29">H&#242;a B&#236;nh</option>
						<option value="30">Hưng Y&#234;n</option>
						<option value="31">Kh&#225;nh H&#242;a</option>
						<option value="32">Ki&#234;n Giang</option>
						<option value="33">Kon Tum</option>
						<option value="34">Lai Ch&#226;u</option>
						<option value="35">L&#226;m Đồng</option>
						<option value="36">Lạng Sơn</option>
						<option value="37">L&#224;o Cai</option>
						<option value="38">Long An</option>
						<option value="39">Nam Định</option>
						<option value="40">Nghệ An</option>
						<option value="41">Ninh B&#236;nh</option>
						<option value="42">Ninh Thuận</option>
						<option value="43">Ph&#250; Thọ</option>
						<option value="44">Ph&#250; Y&#234;n</option>
						<option value="45">Quảng B&#236;nh</option>
						<option value="46">Quảng Nam</option>
						<option value="47">Quảng Ng&#227;i</option>
						<option value="48">Quảng Ninh</option>
						<option value="49">Quảng Trị</option>
						<option value="50">S&#243;c Trăng</option>
						<option value="51">Sơn La</option>
						<option value="52">T&#226;y Ninh</option>
						<option value="53">Th&#225;i B&#236;nh</option>
						<option value="54">Th&#225;i Nguy&#234;n</option>
						<option value="55">Thanh H&#243;a</option>
						<option value="56">Th&#224;nh Phố Hồ Ch&#237; Minh</option>
						<option value="57">Thừa Thi&#234;n Huế</option>
						<option value="58">Tiền Giang</option>
						<option value="59">Tr&#224; Vinh</option>
						<option value="60">Tuy&#234;n Quang</option>
						<option value="61">Vĩnh Long</option>
						<option value="62">Vĩnh Ph&#250;c</option>
						<option value="63">Y&#234;n B&#225;i</option>
				</select></li>
				<li class="li-search">
						<input name="txtsearch" class="txt-search" type="text" placeholder="       Nhập địa điểm cần tìm kiếm...">
						<input type="submit" class="btn" value="Tìm kiếm" />
				</li>
				<li class="li-add"><img src="image/add.png" width="25" height="25"></li>
				<li class="li-2"><a href="createlocal.jsp">Tạo địa điểm</a></li>
				<li class="li-3"><a href="introduce.jsp">Giới thiệu</a></li>
				<li class="li-4"><a href="">Liên hệ</a></li>
			</ul>
			</form>
		</div>
		
		<div id="content">
<!-- 			<div id="top"> -->
<!-- 				<a href="homepage.jsp">Trang chủ</a> > <a href="createlocal.jsp">Tạo địa điểm mới</a> -->
<!-- 			</div> -->
			<%
				request.setCharacterEncoding("UTF-8");
				response.setCharacterEncoding("UTF-8");
				String localname = request.getParameter("name");
			%>
			<div id="content-between">
					<section id="main_content" class="inner">
						<div id="content-main">
							<h3>Thêm địa điểm mới</h3><br/>
							<b><%=localname %></b> của bạn đã được tạo thành công !<br/>
							<div id="content-acc">
								<p><i>Địa điểm này sẽ được Content Editor của Vnplace kiểm duyệt !</i></p>
							</div>
							<p>Bạn có muốn tạo địa điểm khác ?</p>
<%-- 							<button class="btn-add" onclick="window.location='localAfterCreate.jsp?name=<%=localname%>'">+ Xem địa điểm bạn vừa tạo</button> --%>
							<button class="btn-create" onclick="window.location='createlocal.jsp'">+ Tạo địa điểm khác</button>
						</div>
					</section>
					<!-- 		end section -->
			</div>
			<div id="right"></div>
		</div>
		<div id="footer">
			<ul id="footer-menu">
				<li><a href="homepage.jsp">Trang chủ</a></li>
				<li><a href="createlocal.jsp">Tạo địa điểm mới</a></li>
				<li><a href="introduce.jsp">Giới thiệu</a></li>
				<li><a href="" class="li-3">Liên hệ</a></li>
			</ul>
			<p class="copyright">©Copyright 2014 VnPlace.vn</p>
		</div>
	</div>
</body>
</html>